package myaction.login;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class LoginAction3 extends ActionSupport {

	private HttpServletRequest myRequest;
	private HttpSession mySession;
	private ServletContext myApplication;

	public LoginAction3() {
		myRequest = ServletActionContext.getRequest();
		mySession = myRequest.getSession();
		myApplication = mySession.getServletContext();
	}

	public String execute() { 
		myRequest.setAttribute("r1", "r3");
		mySession.setAttribute("s1", "s3");
		myApplication.setAttribute("a1", "a3");
		return SUCCESS;
	}

}
